package com.github.raffle.behavior.command;

/**
 * 遥控器，发出命令的操作。
 * @author Stephen Liu
 * @since Jan 27, 2016
 * @version 1.0.0
 */
public class Controller {

	private Command pcmd;
	private Command scmd;
	private Command ncmd;
	private Command bcmd;
	public Controller(Command pcmd, 
			Command scmd, 
			Command ncmd, 
			Command bcmd) {
		this.pcmd = pcmd;
		this.scmd = scmd;
		this.ncmd = ncmd;
		this.bcmd = bcmd;
	}
	
	public void play() {
		pcmd.execute();
	}
	public void stop() {
		scmd.execute();
	}
	public void next() {
		ncmd.execute();
	}
	public void back() {
		bcmd.execute();
	}
}
